package libs.yzx.zaza.za;

import android.content.Context;
import android.util.AttributeSet;
import android.util.Log;
import android.view.MotionEvent;
import android.widget.ArrayAdapter;
import android.widget.GridView;

/**
 * Created by Administrator on 2016/7/19.
 */
public class SonView extends GridView {
    public SonView(Context context) {
        super(context);
    }

    public SonView(Context context, AttributeSet attrs) {
        super(context, attrs);
    }


    @Override
    protected void onAttachedToWindow() {
        super.onAttachedToWindow();
        postDelayed(new Runnable() {
            @Override
            public void run() {
                setAdapter(new ArrayAdapter<>(getContext(), android.R.layout.simple_list_item_1, android.R.id.text1, new String[]{
                        "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1",
                        "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1",
                }));
            }
        }, 1000);
    }


    @Override
    public boolean onTouchEvent(MotionEvent event) {
        Log.e("--->>", "son  touch-----" + event.getAction());
        super.onTouchEvent(event);
        return true;
    }

}
